<?=
get_toolbar(array('accion' => 'custom',
    'botones' => '<a href="' . site_url(get_uri_string()) . '" class="btn btn-warning color-blanco">' . ulang('ver_listado_anuncios') . '</a>'));
?>
<?= get_alert(isset($success) ? $success : null, isset($error) ? $error : null); ?>
<div class="row">
    <div class="col-md-12">
        <div class="portlet box blue" id="form_wizard_1">
            <div class="portlet-title">
                <div class="caption">
                    <i class="icon-reorder"></i> <?= ulang('nuevo_anuncio') ?> - <span class="step-title"><?= ulang('paso') ?> 1 <?= lang('de') ?> 4</span>
                </div>
            </div>
            <div class="portlet-body form">
                <form class="form-horizontal" action="<?= site_url($this->uri->uri_string()) ?>" id="form_mantenimiento" enctype="multipart/form-data" method="post">
                    <div class="form-wizard">
                        <div class="form-body">
                            <?= $wizard ?>
                            <div id="bar" class="progress progress-striped" role="progressbar">
                                <div class="progress-bar progress-bar-info" style="width: 25%;"></div>
                            </div>
                            <div class="tab-pane active" id="tab1">
                                <h5>¿<?=ulang('que_animal_quieres_crear')?>?</h5>
                                <div class="row mix-grid" style="margin-top: 20px">
                                    <?php foreach($subtipos as $subtipo){?>
                                        <div class="col-md-2 col-sm-2 mix category_1">
                                            <div class="mix-inner" style="<?=isset($query) ? $query['pst_id'] == $subtipo['pst_id'] ? 'border: 3px solid #0DA3E2;' : '' : ''?>">
                                                <img class="img-responsive" src="<?=site_url(IMG.'animals/' . $subtipo['pst_slug']."-icon.png")?>" alt="" style="padding-left: 10px;">
                                                <div class="mix-details">
                                                    <?php $arreglo['clase'] = $subtipo['pst_id'];?>
                                                    <h4><?=$subtipo['pst_slug']?></h4>
                                                    <a class="mix-link width100" href="<?=site_url(PANEL.$globals['url_base']."/paso2/".$this->uri->assoc_to_uri($arreglo))?>">
                                                        <?=ulang('seleccionar')?>
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                    <?php }?>
                                </div>
                                <?php if($arreglo['id'] != null){?>
                                    <?php $arreglo['clase'] = null;//reiniciamos el valor para que no salga en la url?>
                                    <div class="form-group">
                                        <div class="col-md-4"></div>
                                        <div class="col-md-5">
                                            <a href="<?= site_url(PANEL. $globals['url_base'].'/paso2/'.$this->uri->assoc_to_uri($arreglo)) ?>" class="btn green color-blanco">
                                                <?= ulang('avanzar_al_siguiente_paso') ?>
                                            </a>
                                        </div>
                                    </div>
                                <?php }?>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    jQuery(function(){
        $('.mix-grid').mixitup();
    })
</script>